/*
File Name: intproc.h
Description: Prototype description of Interrupt Processing
*/
#ifndef INTPROC_H
#define INTPROC_H
#ifdef __cplusplus
extern "C"
{
#endif ///__cplusplus

//define for internal driver trigger event
#define MRVL_SOFT_INT_ChipReset             (1<<0)
#define MRVL_SOFT_INT_CMD					(1<<1)
#define MRVL_SOFT_INT_AutoDeepSleep         (1<<2)
#define MRVL_SOFT_INT_TxRequest         	(1<<3)


/*
Data structure to initialize the IntParam
*/
typedef struct _int_init
{
	PMRVDRV_ADAPTER	pAdapter;
	NDIS_HANDLE		MrvDrvAdapterHdl;
	ULONG            IstThreadPriority;
	
} INTINIT, *PINTINIT;


/* ========================================================================= */
///Init/Deinit interface
NDIS_STATUS InitIntParam(IN PPVOID, IN PINTINIT);
NDIS_STATUS SetupIntIst( IN PVOID pIntInit );
NDIS_STATUS	DeinitIntParam(IN PVOID);

HANDLE	GetIstWaitEvent(IN PVOID);
ULONG	GetSoftIntr(IN PVOID);
VOID	SetSoftIntr(IN PVOID, IN ULONG);
IF_REGVAL	GetHostIntr(IN PVOID);
VOID	SetHostIntr(IN PVOID, IN IF_REGVAL);
ULONG	GetWaitIntType(IN PVOID);
VOID	ClearWaitIntType(IN PVOID, IN ULONG);
CRITICAL_SECTION* GetIntrCS(IN PVOID);
///////////////////////////////////////////////////////////////////
//  SDNdisInterruptCallback - interrupt handler
//  Input:  hDevice - handle to the SDIO device
//          pAdapter - adapter context
//  Output: 
//  Returns:  SD_API_STATUS code
//  Notes:  
///////////////////////////////////////////////////////////////////
SD_API_STATUS NdisInterruptCallback(IN PVOID hDevice, 
                                      IN PVOID);

#ifdef __cplusplus
}
#endif ///__cplusplus
#endif ///INTPROC_H



